package cn.openea.perpartner.meily.web.service;

import cn.openea.perpartner.meily.web.entity.Customer;
import cn.openea.perpartner.meily.web.entity.CustomerRecommend;
import cn.openea.perpartner.meily.web.entity.dto.CustomerDTOFactory;
import cn.openea.perpartner.meily.web.entity.vo.CustomerRecommendVo;
import cn.openea.perpartner.meily.web.entity.vo.CustomerSearchVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author ysk
 * @email zane_ysk@qq.com
 * @date 2023-04-27 19:04:05
 */
public interface ICustomerService extends IService<Customer> {

    List<Customer> selectListByVO(CustomerSearchVo searchVo);

    /**
     * 统计客户类型的数量
     */
    Map<String, Integer> statisticsCustomerTypeQuantity(CustomerSearchVo searchVo);

    List<Customer> selectByIds(List<String> batchIds);

    Customer findByUserId(String userId);

    /**
     * 更新个人基本信息
     * @param customer
     */
    boolean update(Customer customer);

    /**
     * 判断个人基本信息是否完善
     * @param userId
     * @return
     */
    boolean finish(String userId);

    /**
     * 修改个人信息 同时修改区域服务商和测评师的信息
     * @param dto
     */
    void updateCustomerByDTO(CustomerDTOFactory.CustomerAllInfoDTO dto);

    /**
     * 为你推荐
     * @param vo
     * @return
     */
    List<Customer> recommend(CustomerRecommendVo vo);

    /**
     * 组装业务数据
     * @param customerList
     * @param searchType
     * @return
     */
    List<CustomerRecommend> assemblyData(List<Customer> customerList, String searchType);

}

